<template>
	<view class="box" v-if="show">
		<view class="loginbox">
			<view class="title">
				提示
			</view>
			<view class="content">
				{{is_error}}
			</view>
			<view class="btn">
				<view class="btn-img" @click="close" style="background-color: #fff;color:#E93E34;">
					关闭
				</view>
				<view class="btn-img" @click="tobuyvip" v-if="is_buy==1">
					购买会员
				</view>
			</view> 
			
		</view>
	</view>
	
</template>

<script>
	import {checkmobileAPI} from "@/api/api.js"
	export default {
		name:"wuMode",
		data() {
			return {
				show:false,
				is_error:"",
				is_buy:0
			};
		},
		methods:{
			check(user_id){
				checkmobileAPI({user_id}).then(res=>{
					if(res.is_mobile==1){
						uni.makePhoneCall({
							phoneNumber: res.mobile
						});
						return
					}
					this.is_buy=res.is_buy 
					this.show=true
					this.is_error=res.is_error
						
					 
				})
			},
			close(){
				this.show=false
			},
			tobuyvip(){
				uni.navigateTo({
					url:"/pageB/other/vip"
				})
			}
			
			
		}
		
	}
</script>

<style lang="less" scoped>
.box{
	width: 100%;
	height: 100%;
	position: fixed;
	left: 0;
	top: 0;
	z-index: 999;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.3);
}
.loginbox{
	border-radius: 20rpx;
	width: 600rpx;
	// height: 500rpx;
	background-color: #fff;
	padding:20rpx 30rpx;
	.title{
		text-align: center;
		line-height: 80rpx;
		font-weight: bold;
		font-size: 35rpx;
	}
	.content{
		text-align: center;
		padding: 40rpx 0 20rpx;
	}
	.btn{
		display: flex;
		align-items: center;
		justify-content: space-between;
		.btn-img{
			width: 250rpx;
			height: 80rpx;
			border-radius: 50rpx;
			background-color: #E93E34;
			border: 1rpx solid #E93E34;
			line-height: 80rpx;
			color: #fff;
			text-align: center;			 
			margin: 40rpx auto 20rpx;
			
		}
	}
	
	
}
</style>